Set DOF distance and f-stop by scripting

Hey,
I am trying to achieve an autofocused depth of field effect on a KeyShot animation.

My camera path was imported as an .abc file from Blender. The camera is moving around an object in a pretty organic way. In a perfect circle motion, I could set the dof distance to the distance between the camera and my object - in my case, this distance changes constantly.

I am trying to write a script that would get the camera-object distance once per frame and sets the dof distance accordingly. This would all work, but I can’t find any method or property in the scripting documentation that would allow me to change the dof value.

I mean, there are things like this:

setCameraFocalLength (...)
    Sets the focal length of the active camera of the scene.
    length = Focal length in mm [5, 200]. *

… but why is there no setCameraDofDistance() ?

2 Likes

Sorry I can’t help you with the scripting but this is actually a feature request of mine, would make animation life a lot easier to have some kind of auto-focus.

You can request this feature and open a ticket.
Or maybe enough users will add their +1 here, so Luxion notice this.

Seems like a baseline feature if you ask me.